package com.project.webpage.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.project.webpage.entity.WebLog;
import com.project.webpage.mapper.WebLogMapper;
import com.project.webpage.service.WebLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class WebLogServiceImpl implements WebLogService {

    @Resource
    private WebLogMapper webLogMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    @DS("master")
    public void insert(WebLog entity) {
        webLogMapper.insertSelective(entity);
    }
}
